const
	Nibbler = require('../lib/Nibbler'),
	Base = require('./base/base');

let base16 = new Nibbler({
    dataBits: 8,
    codeBits: 4,
    keyString: '0123456789abcdef'
});

/**
 * @extends base
 */
module.exports = class extends Base {
	encodeAction(param){
		return base16.encode(param.text);
	}
	decodeAction(param){
		// return Buffer.from(param.text, 'hex').toString();
		return base16.decode(param.text.toLowerCase());
	}
}
